package WeekThree;

import java.util.Scanner;

public class StrJude {
    public static void main(String[] args) {
        System.out.println("请输入两个字符串");
        Scanner scanner = new Scanner(System.in);
        String next = scanner.next();
        String next1 = scanner.next();
        if (String(next,next1)){
            System.out.println("这两个字符是逆置的");
        }else {
            System.out.println("这两个字符不是逆置的");
        }
    }
    public static boolean String(String next ,String next1){
        if (next.length()!=next1.length()){
            return false;
        }
        int length=next.length();
        for (int i =0;i <length;i++){
            if (next.charAt(i)!=next1.charAt(length-1-i)){
                return false;
            }
        }
        return true;
    }
}
